<!-- 以下代码为代码生成器生成，生成时间: 2018-01-31 20:24:04，作者：billjiang/475572229@qq.com-->
<section class="content-header">
	<h1>
		历史数据 <small>列表</small>
	</h1>
	<ol class="breadcrumb">
		<li><a href="${basePath}"><i class="fa fa-dashboard"></i> 首页</a></li>
		<li><a href="#">系统管理</a></li>
		<li class="active">历史数据</li>
	</ol>
</section>

<section class="content">
	<div class="row">
		<div class="col-md-2" style="padding-left: 5px; padding-right: 5px;">

			<!-- Profile Image -->
			<div class="box box-primary">
				<div class="box-body box-profile">
					<div id="tree"></div>
				</div>
			</div>
		</div>

		<div class="col-md-10" style="padding-left: 5px; padding-right: 5px;">
			<div class="row">
				<div class="col-md-3" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555048710&to=1521555948710&panelId=10&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>
				<div class="col-md-3" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555113965&to=1521556013966&panelId=11&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>
				<div class="col-md-6" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555136014&to=1521556036014&panelId=9&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-3" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555193084&to=1521556093084&panelId=3&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>

				<div class="col-md-3" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
						<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555214059&to=1521556114059&panelId=1&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>
				<div class="col-md-3" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
						<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555230744&to=1521556130744&panelId=4&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>
				<div class="col-md-3" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
						<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo2?orgId=1&from=1521555246603&to=1521556146603&panelId=2&theme=light" width="100%" height="200" frameborder="0"></iframe>
						</div>
					</div>
				</div>
			</div>
			
			<div class="row">
				<div class="col-md-6" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo?orgId=1&panelId=7&from=1521124034098&to=now&theme=light" width="550" height="220" frameborder="0"></iframe>
						</div>
					</div>
				</div>

				<div class="col-md-6" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo?orgId=1&panelId=8&from=1521124053016&to=now&theme=light" width="550" height="220" frameborder="0"></iframe>
						</div>
					</div>
				</div>
			</div>
			
			<div class="row">
				<div class="col-md-6" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo?orgId=1&panelId=5&from=1521123988497&to=1521124888497&theme=light" width="550" height="220" frameborder="0"></iframe>
						</div>
					</div>
				</div>

				<div class="col-md-6" style="padding-left: 2px; padding-right: 2px;">
					<div class="box box-primary">
						<div class="box-body">
							<iframe src="http://118.178.195.40:3000/dashboard-solo/db/demo?orgId=1&panelId=6&from=1521124014133&to=1521124914133&theme=light" width="550" height="220" frameborder="0"></iframe>
						</div>
					</div>
				</div>
			</div>
		</div>

	</div>
</section>

<script>
	var selectNode;
	var currentObj = {
		initTree : function(selectNodeId) {
			var self = this;
			var treeData = null;
			ajaxPost(basePath + "/org/treeData", null, function(data) {
				treeData = data;
			});
			$("#tree").treeview({
				data : treeData,
				showBorder : true,
				expandIcon : "glyphicon glyphicon-stop",
				collapseIcon : "glyphicon glyphicon-unchecked",
				levels : 3,
				onNodeSelected : function(event, data) {
					selectNode = data.id;
					//TODO加载基地数据
				}
			});
			if (treeData.length == 0)
				return;
			//默认选中第一个节点
			selectNodeId = selectNodeId || 0;
			$("#tree").data('treeview').selectNode(selectNodeId);
			$("#tree").data('treeview').expandNode(selectNodeId);
			$("#tree").data('treeview').revealNode(selectNodeId);
		}
	}

	$(function() {
		currentObj.initTree(1);
	})
</script>